﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Win.master" AutoEventWireup="true" CodeBehind="CustomerProductAdd.aspx.cs" Inherits="Runda.EShop.SaaS.CustomerManage.CustomerProductAdd" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
<script type="text/javascript">
    function CheckSelect() {
        var item = $("input:checkbox:checked");
        var len = item.length;
        if (len > 0) {
            return true;
        }
        else {
            alert('请选择产品.');
            return false;
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
    <div class="i_tablebt_xian" style="margin:10px 0px 0px 0px; width:100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />添加客户产品-查询</span>
    </div>
    <div class="clear"></div>
      <table cellspacing="0" cellpadding="0" class="i_center_table0zs clear" style="width:100%;height:30px;">
        <tr>
        <td>编号</td>
            <td>
                <asp:TextBox ID="txtProductCode" runat="server"></asp:TextBox>
            </td>
        <td>名称</td>
            <td>
                <asp:TextBox ID="txtProductName" runat="server"></asp:TextBox>
            </td>
        <td>
                大类</td>
            <td>
                <asp:DropDownList ID="ddlCateType" runat="server">
                </asp:DropDownList>
             </td>
             
        <td align="right">
                    <div class="banner r"><asp:LinkButton ID="lnkbtnQuery" runat="server" 
                            onclick="lnkbtnQuery_Click">查询</asp:LinkButton></div>
            </td>
        </tr>
    </table>
    <div class="clear"></div>
    <div class="i_tablebt_xian" style="margin:10px 0px 0px 0px; width:100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />添加客户产品-查询结果</span>
    </div>
    <div class="clear"></div>
 <asp:GridView ID="gvProductList" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID">
        <Columns>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:CheckBox ID="cbSelect" runat="server" />
                </ItemTemplate>
                <ItemStyle Width="40px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="产品编号">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkbtnView" runat="server" OnClientClick='<%# "return OnOpenWinCustom(\"../BasManage/ProductView.aspx?ProductID="+Eval("ProductID")+"\",\"查看\",700,500);" %>'><%# Eval("ProductCode") %></asp:LinkButton> 
                </ItemTemplate>
                <ItemStyle Width="90px" />
            </asp:TemplateField>
          <asp:BoundField DataField="ProductName" HeaderText="产品名称" />
          <asp:BoundField DataField="Alias" HeaderText="简称" />
          <asp:BoundField DataField="Standard" HeaderText="规格" />
          <asp:TemplateField HeaderText="单位">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Unit") %>' ></asp:Label>
                </ItemTemplate>
                <ItemStyle Width="40px" />
            </asp:TemplateField>
          
        </Columns>            
        </asp:GridView>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb" 
        CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条" 
        ShowCustomInfoSection="Left" CustomInfoSectionWidth="180px" PageSize="10"
        NumericButtonCount="10" onpagechanged="AspNetPager1_PageChanged"></webdiyer:AspNetPager>
    <div class="clear"></div>

    <div>
        <asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" OnClientClick="return CheckSelect();"/>
       <asp:Button ID="btnSaveQuit" runat="server" Text="保存并退出" 
            onclick="btnSaveQuit_Click" OnClientClick="return CheckSelect();"/>
    </div>
</asp:Content>
